# 测试用文件
import main as main_prg
import time
import os

print("开启测试", end="")
for i in range(6):
    print(".", end="", flush=True)
    time.sleep(0.2)
print("\n")
if "config.ini" in os.listdir():
    print("检测到存在配置文件，删除")
    os.remove("config.ini")
    print("创建新的配置文件")
    main_prg.create_config()
    print("成功")

print("\n测试读取")
load = main_prg.load_config()
for i in load:
    print(f"读取到Section:[{i}]",end="")
    print(dict(load[i]))
